package top.zhangjianyong.tools.service.mybatis.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.zhangjianyong.tools.entity.Holiday;
import top.zhangjianyong.tools.mapper.HolidayMapper;
import top.zhangjianyong.tools.service.mybatis.IHolidayService;

import java.time.LocalDate;

@Slf4j
@Service
public class IHolidayServiceImpl extends ServiceImpl<HolidayMapper, Holiday> implements IHolidayService {


    @Override
    public Holiday getHolidayByDate(LocalDate date) {
        return lambdaQuery()
                .eq(Holiday::getDate, date)
                .one();
    }


}
